﻿using System;
using System.Collections;
using System.Configuration;
using System.Data;
using System.Web;
using System.Web.Security;
using System.Web.UI;
using System.Web.UI.HtmlControls;
using System.Web.UI.WebControls;
using System.Web.UI.WebControls.WebParts;
using AspNetCs.Model;
using AspNetCs.Bll;
using System.Text;

public partial class AjaxXml_SearchUsers : BasePage
{
    protected void Page_Load(object sender, EventArgs e)
    {
        StringBuilder str = new StringBuilder();
        Users users = User_Bll.CreateNew;

        DataTable dataTable=users.GetDataTable();
        //, Ada,Adamsville,Addyston,Adelphi,Adena,Adrian,Akron

        int currentId = Base_GetUserInfo.UserId;
        foreach(DataRow row in dataTable.Rows)
        {
            string id = row["Userid"].ToString();
            string userName = row["userName"].ToString();
            if(!id.Equals(currentId.ToString()))
            {
                str.AppendFormat("{0}|{1}\n", userName, id);
            }
            
        }
        Response.Write(str);
        Response.End();
    }
}
